#
# Makefile for Hello Program
#

CC_PTHREAD_FLAGS			 = -lpthread
CC_FLAGS                     = -c 
CC_OUTPUT_FLAGS				 = -o
CC                           = gcc
RM                           = rm
RM_FLAGS                     = -f

TARGET = target
SRCDIR = src

OBJS = $(SRCDIR)/source.o

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CC) $(CC_OUTPUT_FLAGS) $@ $^ $(CC_PTHREAD_FLAGS)

$(SRCDIR)/%.o: $(SRCDIR)/%.c
	$(CC) $(CC_FLAGS) $< $(CC_OUTPUT_FLAGS) $@

clean:
	$(RM) $(RM_FLAGS) $(OBJS) $(TARGET) *.bak